]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Revert "appDisplay: Special case terminal launching"
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 11 Feb 2014 14:40:47 +0000 (15:40 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 14 Feb 2014 11:01:48 +0000 (12:01 +0100)
Having terminal launchers behave differently than any other launchers
is non-obvious and confusing. Remove the special-casing to restore
consistency, we will make the new window action more accessible
instead.
This reverts commit 68faba6bde08a8898941, 4ed0f3e5f0f9d2f7
and 887a21afb97aaa35.

https://bugzilla.gnome.org/show_bug.cgi?id=695010

js/ui/appDisplay.js

index f23d054ad41a334bbb22a20f4230852b078ff96d..4af4198e0dbff49ebf0c1ae3935c130a49aaebd9 100644 (file)
@@ -46,21 +46,6 @@ const INDICATORS_ANIMATION_MAX_TIME = 0.75;
 const PAGE_SWITCH_TRESHOLD = 0.2;
 const PAGE_SWITCH_TIME = 0.3;
 
-function _getCategories(info) {
-    let categoriesStr = info.get_categories();
-    if (!categoriesStr)
-        return [];
-    return categoriesStr.split(';');
-}
-
-function _isTerminal(app) {
-    let info = app.get_app_info();
-    if (!info)
-        return false;
-    let categories = _getCategories(info);
-    return categories.indexOf('TerminalEmulator') > -1;
-}
-
 function _listsIntersect(a, b) {
     for (let itemA of a)
         if (b.indexOf(itemA) >= 0)
@@ -888,7 +873,7 @@ const AppSearchProvider = new Lang.Class({
         let app = this._appSys.lookup_app(result);
         let event = Clutter.get_current_event();
         let modifiers = event ? event.get_state() : 0;
-        let openNewWindow = (modifiers & Clutter.ModifierType.CONTROL_MASK) || _isTerminal(app);
+        let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
 
         if (openNewWindow)
             app.open_new_window(-1);
@@ -1466,9 +1451,8 @@ const AppIcon = new Lang.Class({
     _onActivate: function (event) {
         let modifiers = event.get_state();
 
-        if ((modifiers & Clutter.ModifierType.CONTROL_MASK
-             && this.app.state == Shell.AppState.RUNNING)
-            || _isTerminal(this.app)) {
+        if (modifiers & Clutter.ModifierType.CONTROL_MASK
+            && this.app.state == Shell.AppState.RUNNING) {
             this.app.open_new_window(-1);
         } else {
             this.app.activate();